package com.bz.item.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bz.item.service.ItemDescService;
import com.bz.mapper.TbItemDescMapper;
import com.bz.pojo.TbItemDesc;
import org.springframework.stereotype.Service;

import java.util.Date;

@Service
public class ItemDescServiceImpl extends ServiceImpl<TbItemDescMapper, TbItemDesc> implements ItemDescService {


    @Override
    //@LcnTransaction
    public Integer insertItemDesc(TbItemDesc tbItemDesc) {
        return this.baseMapper.insert(tbItemDesc);
    }

    @Override
    //@LcnTransaction
    public Integer updateItemDesc(TbItemDesc tbItemDesc) {
        tbItemDesc.setUpdated(new Date());
        return this.baseMapper.updateById(tbItemDesc);
    }

    @Override
    public TbItemDesc selectItemDescByItemId(Long itemId) {
        return this.baseMapper.selectById(itemId);
    }
}
